package srcSAT;

public class Edge 
{
    private int sourceNode;
    private int destinationNode;
    
    public Edge(int sourceNode, int destinationNode) 
    {
        this.sourceNode = sourceNode;
        this.destinationNode = destinationNode;
    }

    public int DestinationNode() 
    {
        return destinationNode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Edge other = (Edge) obj;
        if (destinationNode != other.destinationNode)
            return false;
        if (sourceNode != other.sourceNode)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + destinationNode;
        result = prime * result + sourceNode;
        return result;
    }

    public int SourceNode() 
    {
        return sourceNode;
    }

    @Override
    public String toString() 
    {
        return String.format(
                "Edge [sourceNode=%s, destinationNode=%s]",
                sourceNode,
                destinationNode);
    }
    
}
